package com.gr.dmbackend.controller.dormaddmin;

import com.alibaba.fastjson.JSONObject;
import com.gr.dmbackend.service.dormaddmin.UpdateEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class UpdateEventController {

    @Autowired
    private UpdateEventService updateEventService;

    @PostMapping("/api/dormaddmin/update-event")
    public JSONObject updateEvent(@RequestParam Map<String, String> data) {
        return updateEventService.updateEvent(data);
    }

}
